const { mongoose } = require("./db");
const Schema = mongoose.Schema;


const userSchema = new Schema({
  avatarUrl: {
    type: String,
    // default: "uploads/info/777.png",
    default: "http://127.0.0.1:3461/api/uploads/info/777.png",
    // default:"https://hbimg.huabanimg.com/3c25956a4fa9ac6090c33ba85f3e45f3a6ef2ee35ce-GDMJhq_fw658"
  }, //头像
  sex: {
    type: String,
    default: "",
  }, //性别
  mobile: {
    type: String,
    default: "",
  }, //联系电话

  status: {
    //状态
    type: Boolean,
    default: true,
  },
  nickName: {
    type: String,
    default: "",
  }, //微信名称
  openid: {
    type: String,
    default: "",
  }, //openid
});

const userModel = mongoose.model("wxuser", userSchema);

module.exports = { userModel };
